<!DOCTYPE html>
<html>
<head>
  <title><%= Setting.app_name %> - 控制台</title>
  <%= stylesheet_link_tag "admin" %>
  <%= javascript_include_tag "app" %>
  <%= csrf_meta_tag %>
</head>
<body>
 <div class="header">
    <div class="header navbar navbar-expand flex-md-row bd-navbar">
      <div class="container d-sm-flex">
        <div class="navbar-header d-none d-md-flex" id="navbar-header" data-turbolinks-permanent>
          <%= link_to("控制台", main_app.admin_root_path, class: "navbar-brand") %>
        </div>
        <div class="navbar-nav-scroll">
          <%= render_list class: "nav navbar-nav" do |li|
            li << link_to(t("admin.menu.root_path"), main_app.admin_root_path, class: "nav-link")
            li << link_to(t("admin.menu.users"), main_app.admin_users_path, class: "nav-link")
            li << link_to(t("admin.menu.sections"), main_app.admin_sections_path, class: "nav-link")
            li << link_to(t("admin.menu.nodes"), main_app.admin_nodes_path, class: "nav-link")
            li << link_to(t("admin.menu.topics"), main_app.admin_topics_path, class: "nav-link")
            li << link_to(t("admin.menu.replies"), main_app.admin_replies_path, class: "nav-link")
            li << link_to(t("admin.menu.comments"), main_app.admin_comments_path, class: "nav-link")
            li << link_to(t("admin.menu.photos"), main_app.admin_photos_path, class: "nav-link")
            li << link_to(t("admin.menu.locations"), main_app.admin_locations_path, class: "nav-link")
            Homeland.admin_navbar_plugins.each do |plugin|
              li << link_to(plugin.display_name, plugin.admin_path, class: "nav-link")
            end
          end  %>
        </div>
        <div class="ml-auto d-md-flex">
          <%= render "shared/usernav" %>
        </div>
      </div>
    </div>
  </div>


  <div class="main-container container">
    <div id="main" class="card">
      <div class="card-body">
        <%= notice_message %>
        <%= yield %>
      </div>
    </div>
  </div>

  <footer class="footer">
    <div class="container">
      <p class="suggest">使用 <a href="http://www.mozillaonline.com/" target="_blank" rel="nofollow">Firefox</a> 或 <a href="http://www.google.com/chrome" target="_blank" rel="nofollow">Chrome</a> 浏览访问本站将会获得更佳的视觉体验.</p>
    </div>
  </footer>
</body>
</html>
